//递增的三元⼦序列（medium）: https://leetcode.cn/problems/increasing-triplet-subsequence/
class Solution
{
public:
	bool increasingTriplet(vector<int>& nums)
	{
		int a = nums[0], b = INT_MAX;
		for (int i = 1; i < nums.size(); i++)
		{
			if (nums[i] > b)
			{
				return true;
			}
			else if (nums[i] > a)
			{
				b = nums[i];
			}
			else
			{
				a = nums[i];
			}
			
		}
		return false;
	}
};